package com.wiscamp.ninechapters.problems.math;

import com.wiscamp.ninechapters.common.core.ParseHelper;
import lombok.Data;

import java.io.Serializable;

/**
 * 角度
 */
@Data
public class LatexAngleDegree implements Serializable {

    public static String ANGLE_DEGREE_LATEX = "^\\circ";

    private Integer value;

    public String getLatex() {
        return value + ANGLE_DEGREE_LATEX;
    }

    public LatexAngleDegree(String content) {
        var text = content.replace(ANGLE_DEGREE_LATEX, "");
        this.value = ParseHelper.parseInteger(text);
    }
}
